<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="../templates/template.xhtml">

	<ui:define name="title">
	 	User Details
	</ui:define>

	<ui:param name="page" value="userDetails" /> 

	<ui:define name="header">
		<ui:include src="/secure/header.xhtml" /> 
	</ui:define>

	<ui:define name="menu">
		<div align="center">
			<h:form id="mennuForm" >
			<br />
			<br />
			<h:commandButton value="Back" action="#{userDetails.gotoUserBrowser}" styleClass="buttonClass" />
			<br />
			<br />
			</h:form>
		</div>		
	</ui:define>

	<ui:define name="body">
		<h:form>
		<br />
		<div id="content">
		<h:panelGrid columns="2" width="100%">
			<h:column>
				<h:panelGrid id="person" styleClass="iTunes" columns="2"
					width="70%">
					<f:facet name="header">
						<h:outputText id="userDetails" value="User Details" />
					</f:facet>
					<h:column>
						<h:outputText id="userID" value="User ID: " />
					</h:column>
					<h:column>
						#{userDetails.personDetails.userId}
					</h:column>
					<h:column>
						<h:outputText id="firstName" value="First Name: " />
					</h:column>
					<h:column>
						#{userDetails.personDetails.firstName}
					</h:column>
					<h:column>
						<h:outputText id="lastName" value="Last Name: " />
					</h:column>
					<h:column>
						#{userDetails.personDetails.lastName}
					</h:column>
					<h:column>
						<h:outputText value="Email Address : " />
					</h:column>
					<h:column>
						#{userDetails.personDetails.profile.email}
					</h:column>
					<h:column>
						<h:outputText id="organizations" value="Filing Court(s): " />
					</h:column>
					<h:column>
						<h:dataTable id="person1" value="#{userDetails.personDetails.organizations}"
							var="rowVar2">
							<h:column>
								<h:outputText value="#{rowVar2.court.name}" />
							</h:column>
						</h:dataTable>
					</h:column>
					<h:column>
						<h:outputText value="Role(s): " />
					</h:column>
					<h:column>
						<h:dataTable id="roles" value="#{userDetails.personDetails.roles}" var="rolesVar"
							 width="40%">
							<h:column>
								<h:outputText value="#{rolesVar.role}" styleClass="fontsubhead"/>
							</h:column>
						</h:dataTable>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText id="deleteUser" value="Delete User" />
						</f:facet>
						<h:commandButton action="#{userDetails.deleteUser}" value="Delete" styleClass="buttonClass" /> 
					
					</h:column>
					
				</h:panelGrid>
			</h:column>
		</h:panelGrid>
		</div>
		<br />
		</h:form>
	</ui:define>

</ui:composition>

</html>
